import request from '@/utils/request'

// 获取企业组织架构
export function getAllList() {
  return request({
    url: '/company/department'
  })
}
// 删除部门
export function delDepartment(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'delete'
  })
}
// 新增部门
export function addDepartment(data) {
  return request({
    url: '/company/department',
    data,
    method: 'POST'
  })
}
// 获取部门详情
export function getDepartment(id) {
  return request({
    url: `/company/department/${id}`
  })
}
// 修改部门
export function editDepartment(id, data) {
  return request({
    url: `/company/department/${id}`,
    method: 'PUT',
    data
  })
}

